// app.js
App({
  //-----------全局的数据和方法-开始------------------
  nickName: "",
  avatarUrl: "",
  changeNickName(nickName) {
    this.nickName = nickName;
    wx.setStorageSync("nickName", nickName);
  },
  //------------全局的数据和方法-结束-----------------
  onLaunch() {
    this.nickName = wx.getStorageSync("nickName");
    this.avatarUrl = wx.getStorageSync("avatarUrl");
  },
})